<?php
/**
 * Created by PhpStorm.
 * User: iceberg
 * Date: 2018-10-02
 * Time: 16:10
 */

namespace app\validate;


use think\Validate;

class UnitValidate extends Validate
{
    protected $rule = [
        'name'  =>  'require|max:25|unique:unit',
        'desc'  =>  'max:100',
    ];

    protected $message = [
        'name.require'  =>  '名称必填',
        'name.max'      =>  '名称最多不能超过25个字符',

        'desc.max'      =>  '备注最多不能超过100个字符',
    ];
}